package com.stylefeng.guns.modular.customer.transfer;

import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 采购配套 excel模板类
 */
@Data
public class PurchaseXlsM {
    @ExcelIgnore
    private Integer customerCompanyId;

    @Excel(name = "客户企业名称",width = 20)
    @NotEmpty(message = "客户企业名称不能为空")
    private String customerCompanyName;

    @Excel(name = "统一社会信用代码",width = 20)
    @NotEmpty(message = "统一社会信用代码")
    private String unifiedSocialCreditCode;
    /**
     * 年度
     */
    @Excel(name = "年度")
    @NotNull(message = "年度不能为空")
    private Integer year;
    /**
     * 供应商名称
     */
    @Excel(name = "供应商名称",width = 20)
    @NotEmpty(message = "供应商名称不能为空")
    private String providerName;
    /**
     * 采购商品
     */
    @Excel(name = "采购产品",width = 15)
    private String product;
    /**
     * 年度采购金额
     */
    @Excel(name = "年度采购金额",width = 15)
    private String annualPurchaseAmount;
    /**
     * 应付账款余额
     */
    @Excel(name = "应付账款余额",width = 15)
    private String accountPayableBalance;
    /**
     * 现金付款量
     */
    @Excel(name = "现金付款量",width = 15)
    private String cashPaid;
    /**
     * 银票付款量
     */
    @Excel(name = "银票付款量")
    private String silverTicketPaid;
    /**
     * 商票付款量
     */
    @Excel(name = "商票付款量")
    private String businessTicketPaid;
    /**
     * 一般期限
     */
    @Excel(name = "一般期限")
    private String period;
    /**
     * 商票贴现量
     */
    @Excel(name = "商票贴现量")
    private String businessTicketDiscount;
    /**
     * 贴现利率
     */
    @Excel(name = "贴现利率")
    private String discountInterestRate;

    /**
     * 供应商供货余额
     */
    @Excel(name = "供应商供货余额",width = 18)
    private String providerProductBalance;

    public static List<PurchaseXlsM> example(){
        List<PurchaseXlsM> list = new ArrayList<>();
        PurchaseXlsM purchaseXlsM = new PurchaseXlsM();
        list.add(purchaseXlsM);
        purchaseXlsM.setCustomerCompanyName("xxx有限公司");
        purchaseXlsM.setUnifiedSocialCreditCode("91440300088450013U");
        purchaseXlsM.setProviderName("京东");
        purchaseXlsM.setYear(2017);
        purchaseXlsM.setProduct("挖掘机");
        purchaseXlsM.setAnnualPurchaseAmount(String.valueOf(10.0));
        purchaseXlsM.setAccountPayableBalance(String.valueOf(10.0));
        purchaseXlsM.setCashPaid(String.valueOf(0.0));
        purchaseXlsM.setSilverTicketPaid(String.valueOf(0.0));
        purchaseXlsM.setBusinessTicketPaid(String.valueOf(0.0));
        purchaseXlsM.setPeriod(String.valueOf(3.0));
        purchaseXlsM.setBusinessTicketDiscount(String.valueOf(0.0));
        purchaseXlsM.setDiscountInterestRate(String.valueOf(0.1));
        purchaseXlsM.setProviderProductBalance(String.valueOf(0.0));
        return list;
    }
}
